#ifndef URLRECOGNISER_H
#define URLRECOGNISER_H

#include <QObject>
#include <QStringList>
#include <map>

class QRegExp;

class YDUrlRecogniser : public QObject {
    Q_OBJECT
public:
    typedef std::map<QString, QStringList> url_map_t;

    explicit YDUrlRecogniser(QObject* parent = nullptr);
    ~YDUrlRecogniser();

    url_map_t recogniseUrl(const QString& str) const;

private:
    QStringList matchAll(QRegExp* reg, const QString& str) const;
};

#endif // URLRECOGNISER_H
